package com.polaris.live.im.db.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey

/**
 * 消息表
 *
 * @author Created by 半仙 on 2023/8/22/022 16:32
 */
@Entity(
    tableName = "greet_message",
    indices = [
        Index(value = ["user_id", "other_id"], unique = true),
    ]
)
data class GreetMessageEntity(
    /**
     * 数据库主键
     */
    @PrimaryKey
    @ColumnInfo(name = "table_id")
    val tableId: String,
    /**
     * 登录用户id
     */
    @ColumnInfo(name = "user_id")
    val userId: Long,
    /**
     * 对方用户id
     */
    @ColumnInfo(name = "other_id")
    val otherId: Long,
    /**
     * 推送id
     */
    @ColumnInfo(name = "push_detail_id")
    val pushDetailId: Long? = null,
)